<?php
include('../../inc/global.inc');
include("../islogin.php");
$url=$_SERVER['HTTP_REFERER'];

$sql="select * from hot_pro where id=".$_GET['xg_id'];
$rs=mysql_query($sql);
$row=mysql_fetch_array($rs);

    $m_arr=mysql_query("select * from member where id = ".$row["member_id"]);
    $m_row = mysql_fetch_array($m_arr);
    if($m_row["m_type"]==6)
    {
        $isvip=1;
        $hot_arr=mysql_query("select * from member_hot where id=".$row["member_id"]);
        $hot_row =mysql_fetch_array($hot_arr);
        $hot_row?$ishot=1:$ishot=0;
    }
    else
    {
        $isvip=0;
    }   

if($_POST['act_xg']){


$p_sh=($_POST[p_sh])?$_POST[p_sh]:0;
$p_tj=($_POST[p_tj])?$_POST[p_tj]:0;
$supply_tj=($_POST[supply_tj])?$_POST[supply_tj]:0;
$is_pifa=($_POST[is_pifa])?$_POST[is_pifa]:0;
$pifa_top=($_POST[pifa_top])?$_POST[pifa_top]:0;
  
  @mysql_query("update hot_pro set p_title='$_POST[p_title]',p_keyword='$_POST[p_keyword]',p_info='$_POST[p_info]',picture='$_POST[picture]',p_pinpai='$_POST[p_pinpai]',p_xinghao='$_POST[p_xinghao]',p_guige='$_POST[p_guige]',p_price='$_POST[p_price]',p_baozhuang='$_POST[p_baozhuang]',p_shuliang='$_POST[p_shuliang]',p_cailiao='$_POST[p_cailiao]',p_changdi='$_POST[p_changdi]',p_jhtime='$_POST[p_jhtime]',p_renzheng='$_POST[p_renzheng]',p_crz='$_POST[p_crz]',p_minorder='$_POST[p_minorder]',p_paytype='$_POST[p_paytype]',p_cl='1',p_sh='$p_sh',p_tj='$p_tj'  where id='".$_POST['iid']."'");



echo "<script>alert('提交成功');location='".$_POST['urls']."';</script>";
}
?>
<HTML>
<HEAD>
<TITLE>Admin</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="../css/css.css" rel=stylesheet>
<script type='text/javascript' src="../js/islogin.js" charset="gb2312"></script>
<script type='text/javascript' src="../js/shijian.js"></script>
<script language="javascript" src="/member/js/catalog.js" type="text/javascript" charset="gb2312"></script>
</HEAD>
<BODY>
<center>

  <table width="780" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td height="25" bgcolor="#EEEEF9" style="padding-left:5px;">产品信息&nbsp;&nbsp;<a href="javascript:history.go(-1)">返回</a></td>
    </tr>
  </table>

<TABLE width="780" border="0" cellpadding="0" cellSpacing="1" bgcolor="#000000">
        <TBODY>
        <form method="post" action="" name="form1">
	 <tr>
        <td align="center" bgcolor="#8DA8CF" colspan="2" height="45"><span style="padding-left:5px;">产品信息</span></td>
      </tr>
          <TR>
            <td width="17%" height="25" align="center" bgcolor="#eff6ff">产品名称</td>
            <TD width="83%" bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_title" value="<?=$row[p_title]?>" type="text" size="70" maxlength="250"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">分类</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;line-height:35px;">
			<?=$row[catalog_1] ?> —— <?=$row[catalog_2] ?> —— <?=$row[catalog_3] ?>
			</TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">关键字</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_keyword" value="<?=$row[p_keyword]?>"  type="text" size="70"></TD>
          </TR>		  
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品简介</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><textarea name="p_info" cols="70" rows="20"><?=$row[p_info]?>
            </textarea></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">图片</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><?php if($row[picture]){?><img src="http://www.sandib2b.cn/upfile/<?=$row[picture]?>" width="140" height="104" border="0" /><br /><?php }?><input name="picture" type="text" size="35" value="<?=$row[picture]?>">
            &nbsp;&nbsp;<input name="button" type="button" onClick="window.open ('../upfile.php', 'newwindow', 'height=50, width=400, top=250, left=250, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')" value="上传图片"></TD>
          </TR>
		  <TR>
            <td height="25" colspan="2" align="left" bgcolor="#8DA8CF" style="padding-left:10px;"><STRONG>产品属性</STRONG></td>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品品牌</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_pinpai" value="<?=$row[p_pinpai]?>" type="text" size="30" maxlength="100"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品型号</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_xinghao" value="<?=$row[p_xinghao]?>" type="text" size="60" maxlength="100"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品规格<font color="#FF0000">*</font></td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_guige" value="<?=$row[p_guige]?>" type="text" size="60" maxlength="100"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品价格</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_price" value="<?=$row[p_price]?>" type="text" size="30" maxlength="100"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品包装</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_baozhuang" value="<?=$row[p_baozhuang]?>" type="text" size="30" maxlength="100"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品总数量</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_shuliang" value="<?=$row[p_shuliang]?>" type="text" size="30" maxlength="100"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品材料</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_cailiao" value="<?=$row[p_cailiao]?>" type="text" size="30" maxlength="100"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品产地</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_changdi" value="<?=$row[p_changdi]?>" type="text" size="30" maxlength="100"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品交货期</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_jhtime" value="<?=$row[p_jhtime]?>" type="text" size="30" maxlength="250"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">产品认证</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_renzheng" value="<?=$row[p_renzheng]?>" type="text" size="30" maxlength="100">
(如:CE认证) </TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">企业认证</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_crz" value="<?=$row[p_crz]?>" type="text" size="30" maxlength="250"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">最小起定量</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_minorder" value="<?=$row[p_minorder]?>" type="text" size="30" maxlength="100"></TD>
          </TR>
          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">付款方式</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input name="p_paytype" type="text" value="<?=$row[p_paytype]?>" size="30" maxlength="100"></TD>
          </TR>
	<TR>
        <td height="25" colspan="2" align="left" bgcolor="#8DA8CF" style="padding-left:10px;"><STRONG>管理员操作</STRONG></td>
     </TR>
	 <tr>
	   <td height="25" align="center" bgcolor="#eff6ff">审核通过</td>
	   <td bgcolor="#ffffff" style="padding-left:3px;"><input type="radio" name="p_sh" value="1" <?php if($row[p_sh]==1){echo "checked";}?>>是<input type="radio" name="p_sh" value="0" <?php if($row[p_sh]==0){echo "checked";}?>>否</td>
      </tr>
	 <tr>
	   <td height="25" align="center" bgcolor="#eff6ff">供应首页推荐</td>
	   <td bgcolor="#ffffff" style="padding-left:3px;"><input type="radio" name="supply_tj" value="1" <?php if($row[supply_tj]==1){echo "checked";}?>>是<input type="radio" name="supply_tj" value="0" <?php if($row[supply_tj]==0){echo "checked";}?>>否</td>
      </tr>
	  	 <tr>
	   <td height="25" align="center" bgcolor="#eff6ff">其它推荐</td>
	   <td bgcolor="#ffffff" style="padding-left:3px;"><input type="radio" name="p_tj" value="1" <?php if($row[p_tj]==1){echo "checked";}?>>是<input type="radio" name="p_tj" value="0" <?php if($row[p_tj]==0){echo "checked";}?>>否</td>
      </tr>
	            </TR>

          <TR>
            <td height="25" align="center" bgcolor="#eff6ff">&nbsp;</td>
            <TD bgcolor="#F9F9F9" style="padding-left:4px;"><input type="submit" value=" 提 交 ">
            <input type="hidden" name="iid" value="<?=$row['id']?>"><input type="hidden" name="urls" value="<?=$url?>"><input type="hidden" name="iid" value="<?=$row['id']?>">
        <INPUT type="hidden" value="ok" name="act_xg"></TD>
          </TR>
 </form>                
</TABLE>
</center>
</BODY>
</HTML>

